package com.lagou.service.impl;

import com.lagou.service.WorkService;
import org.apache.dubbo.config.annotation.Service;

import java.util.concurrent.ThreadLocalRandom;

@Service
public class WorkServiceImpl implements WorkService {
    @Override
    public String methodA(String str) {
        try {
            Thread.sleep(ThreadLocalRandom.current().nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "method A: " + str;

    }

    @Override
    public String methodB(String str) {
        try {
            Thread.sleep(ThreadLocalRandom.current().nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "method B: " + str;

    }

    @Override
    public String methodC(String str) {
        try {
            Thread.sleep(ThreadLocalRandom.current().nextInt(100));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "method C: " + str;
    }
}
